<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.model.Department1"%>
<%@page import="java.util.List"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.dao.DepartmentDao"%>
<%@ page language="java" pageEncoding="UTF-8"%>

<%
{
DepartmentDao departDao = DaoCreator.createDepartmentDao();
List<Department1> depart1List = departDao.getDepartment1List(Constants.DEPARTMENT_TYPE_SHIYEBU);
List<Department1> depart1List1 = departDao.getDepartment1List(Constants.DEPARTMENT_TYPE_JIGUAN);
depart1List.addAll(depart1List1);

Long theDepart1ID = 0L;
String depart1IDStr = (String)request.getParameter(Constants.REQUEST_PARAMETER_DEPARTMENT1ID);
try{
	theDepart1ID = Long.parseLong(depart1IDStr);
}catch(Exception e){
	
}

%>
<select id="depart1" onchange="selectDepart1();">
	<option value="0" selected="selected">--请选择部门--</option>
<%
for (Department1 depart1: depart1List) {
%>
	<option value="<%=depart1.getId()%>" <%=theDepart1ID.equals(depart1.getId())? "selected":""%>><%=depart1.getDepartmentName()%></option>
<%
}
%>
</select>
<%
}
%>